﻿//添加光棒效果
$(function() {
    $("#Tableuserinfo tr:gt(0)").mousemove(function() {
        $(this).css("background-Color", "#fff");
    }).mouseout(function() {
        $(this).css("background-Color", "");
    });
});
//查看员工的工作日志
function Allworkblog(obj) {
    var userid = $(obj).siblings("#hidden_userid").val();
    window.location.href = "/WorkBlog/WorkList?userId=" + userid + "";
}
//修改用户信息
function updateuserinfo(obj) {
    var userid = $(obj).siblings("#hidden_userid").val();
    window.location.href = "/Userinfo/UpdateUser?userid=" + userid + "";
}
//删除用户信息
function AjaxDeleteUser(obj) {
    var userid = $(obj).siblings("#hidden_userid").val();
    if (confirm("您确定要删除这条用户信息吗？？")) {
        $.post(
                "/Userinfo/DeleteUser",
                "userid=" + userid,
                function(date) {
                    if (date == "error") {
                        window.location.href = "/home/error";
                    }
                    else {
                        alert("您已成功删除该条记录！！");
                        window.location.href = "/Userinfo/ShowUser";
                    }
                })
    }
}